View Issue Details

IDProjectCategoryView StatusLast Update
0015585ScribusGraphics / Image Framespublic2019-06-04 20:55
Reporterale Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.5.svn 
Fixed in Version1.5.5.svn 
Summary0015585: Enable toolsEditContents action also when image is set to scale to frame
Descriptioncurrently in appmodehelper.cpp there is:

(*a_scrActions)["toolsEditContents"]->setEnabled(currItem->ScaleType);
https://github.com/scribusproject/scribus/blob/master/scribus/appmodehelper.cpp#L573

what does this do?

ScaleType is true for free scale images and false for the ones scaled to the frame, but the button in the toolbar seems to be always active for all images.

since it seems to do nothing, i would use

(*a_scrActions)["toolsEditContents"]->setEnabled(true);
TagsNo tags attached.
PatchNo

Activities

ale

2019-03-05 07:50

manager   ~0045958

i've checked a bit further:

- when a document is opened, scribus runs two times

AppModeHelper::setModeActionsPerMode(int newMode)
(*a_scrActions)["toolsEditContents"]->setChecked(newMode==modeEdit);
https://github.com/scribusproject/scribus/blob/master/scribus/appmodehelper.cpp#L983



when an image item is clicked, scribus runs two times

AppModeHelper::enableActionsForSelection()
(*a_scrActions)["toolsEditContents"]->setEnabled(currItem->ScaleType);
https://github.com/scribusproject/scribus/blob/master/scribus/appmodehelper.cpp#L573

then one time

AppModeHelper::setModeActionsPerMode(int newMode)
(*a_scrActions)["toolsEditContents"]->setChecked(newMode==modeEdit);
https://github.com/scribusproject/scribus/blob/master/scribus/appmodehelper.cpp#L983


the line seems to have no effect.

jghali

2019-03-10 11:19

administrator   ~0045979

Last edited: 2019-03-10 13:39

>> (*a_scrActions)["toolsEditContents"]->setEnabled(currItem->ScaleType);
>> what does this do?

Previously we didn't allow user to enter Edit mode if image scale type was "scale to frame" and image offsets were also expected to be 0.0 in this case. Now we allow user to enter Edit mode even is image scale type is "scale to frame" so this line should be indeed
(*a_scrActions)["toolsEditContents"]->setEnabled(true);

Issue History

Date Modified Username Field Change
2019-03-05 07:44 ale New Issue
2019-03-05 07:50 ale Note Added: 0045958
2019-03-06 00:07 jghali Category - => Graphics / Image Frames
2019-03-10 11:19 jghali Note Added: 0045979
2019-03-10 11:20 jghali Summary images and enabling toolsEditContents => Enable toolsEditContents action also when image is set to scale to frame
2019-03-10 11:23 jghali Assigned To => jghali
2019-03-10 11:23 jghali Status new => resolved
2019-03-10 11:23 jghali Resolution open => fixed
2019-03-10 11:23 jghali Fixed in Version => 1.5.5.svn
2019-03-10 13:39 jghali Note Edited: 0045979
2019-06-04 20:55 cbradney Status resolved => closed