Commit 41b6455d authored by Alexander Semke's avatar Alexander Semke
Browse files

When openning a project containing image entries, don't show the settings...

When openning a project containing image entries, don't show the settings dialog for them. Only show this dialog when a new image entry is created via menus.
parent 2d42018e
Pipeline #75039 passed with stage
in 19 minutes and 12 seconds
......@@ -37,7 +37,6 @@ ImageEntry::ImageEntry(Worksheet* worksheet) : WorksheetEntry(worksheet)
setFlag(QGraphicsItem::ItemIsFocusable);
updateEntry();
startConfigDialog();
}
void ImageEntry::populateMenu(QMenu* menu, QPointF pos)
......
......@@ -845,6 +845,7 @@ WorksheetEntry* Worksheet::insertEntry(const int type, WorksheetEntry* current)
focusEntry(entry);
makeVisible(entry);
return entry;
}
......@@ -865,7 +866,10 @@ WorksheetEntry* Worksheet::insertCommandEntry(WorksheetEntry* current)
WorksheetEntry* Worksheet::insertImageEntry(WorksheetEntry* current)
{
return insertEntry(ImageEntry::Type, current);
auto* entry = insertEntry(ImageEntry::Type, current);
auto* imageEntry = static_cast<ImageEntry*>(entry);
QTimer::singleShot(0, this, [=] () {imageEntry->startConfigDialog();});
return entry;
}
WorksheetEntry* Worksheet::insertPageBreakEntry(WorksheetEntry* current)
......@@ -943,7 +947,10 @@ WorksheetEntry* Worksheet::insertPageBreakEntryBefore(WorksheetEntry* current)
WorksheetEntry* Worksheet::insertImageEntryBefore(WorksheetEntry* current)
{
return insertEntryBefore(ImageEntry::Type, current);
auto* entry = insertEntryBefore(ImageEntry::Type, current);
auto* imageEntry = static_cast<ImageEntry*>(entry);
QTimer::singleShot(0, this, [=] () {imageEntry->startConfigDialog();});
return entry;
}
WorksheetEntry* Worksheet::insertLatexEntryBefore(WorksheetEntry* current)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment