mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Use the QWidget modified property instead of the UXTEditor's own.
This commit is contained in:
parent
b86fce833c
commit
237ac85e9c
1 changed files with 3 additions and 5 deletions
|
@ -38,12 +38,10 @@ public:
|
||||||
UXTEditorPvt()
|
UXTEditorPvt()
|
||||||
{
|
{
|
||||||
t = new QTableWidget();
|
t = new QTableWidget();
|
||||||
changed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QTableWidget *t;
|
QTableWidget *t;
|
||||||
std::vector< STRING_MANAGER::TStringInfo > infos;
|
std::vector< STRING_MANAGER::TStringInfo > infos;
|
||||||
bool changed;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -141,7 +139,7 @@ void UXTEditor::saveAs( QString filename )
|
||||||
|
|
||||||
f.close();
|
f.close();
|
||||||
|
|
||||||
d_ptr->changed = false;
|
setWindowModified( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UXTEditor::activateWindow()
|
void UXTEditor::activateWindow()
|
||||||
|
@ -152,7 +150,7 @@ void UXTEditor::activateWindow()
|
||||||
|
|
||||||
void UXTEditor::closeEvent( QCloseEvent *e )
|
void UXTEditor::closeEvent( QCloseEvent *e )
|
||||||
{
|
{
|
||||||
if( d_ptr->changed )
|
if( isWindowModified() )
|
||||||
{
|
{
|
||||||
int reply = QMessageBox::question( this,
|
int reply = QMessageBox::question( this,
|
||||||
tr( "Table changed" ),
|
tr( "Table changed" ),
|
||||||
|
@ -181,7 +179,7 @@ void UXTEditor::onCellChanged( int row, int column )
|
||||||
if( column == 1 )
|
if( column == 1 )
|
||||||
info.Text = item->text().toUtf8().constData();
|
info.Text = item->text().toUtf8().constData();
|
||||||
|
|
||||||
d_ptr->changed = true;
|
setWindowModified( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UXTEditor::setHeaderText( const QString &id, const QString &text )
|
void UXTEditor::setHeaderText( const QString &id, const QString &text )
|
||||||
|
|
Loading…
Reference in a new issue