Skip to content
Snippets Groups Projects
Commit 42c2ce7f authored by Provot Bertrand's avatar Provot Bertrand
Browse files

Improvments on filter editor interface and bug fixes

parent 6957ae5f
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,13 @@ void FilterEditor::save()
return;
}
//condition regex sur le format du fichier .xml
// if(...
if(!regex_match(_linePath->text().toStdString(),regex("(.*).xml$"))){
QMessageBox msgBox(QMessageBox::Critical, tr("Error!"), tr("Your file needs .xml format."));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec();
return;
}
bool ok;
......
......@@ -96,23 +96,35 @@ void FilterEditorItem::initUI()
void FilterEditorItem::widthChanged(const int width)
{
if(_width < width)
emit(insertColumn(width-_width));
else
emit(removeColumn(_width-width));
_width = width;
if(_width < width){
while(_width!=width){
emit(insertColumn(width-_width));
_width++;
}
}
else{
while(_width!=width){
emit(removeColumn(_width-width));
_width--;
}
}
_filter->resizeColumnsToContents();
}
void FilterEditorItem::heightChanged(const int height)
{
if(_height < height)
emit(insertRow(height-_height));
else
emit(removeRow(_height-height));
_height = height;
if(_height < height){
while(_height!=height){
emit(insertRow(height-_height));
_height++;
}
}
else{
while(_height!=height){
emit(removeRow(_height-height));
_height--;
}
}
_filter->resizeRowsToContents();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment