QCAD Bugtracker

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category QCAD (main)
  • Assigned To
    Andrew
  • Operating System Linux (All / Other)
  • Severity Low
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by Anonymous Submitter - 14.04.2011
Last edited by Anonymous Submitter - 14.04.2011

FS#9 - RSettings.setValue() doesn't work for "GraphicsViewColors/BackgroundColor"

Context: Needed to set color settings for book images.

RSettings.setValue("GraphicsViewColors/BackgroundColor", new RColor(0xff, 0xfe, 0xfd));
RSettings.setValue("GraphicsViewColors/MetaGridColor", new RColor(0xff, 0xfe, 0xfd));

QCAD3.conf:

BackgroundColor=@Variant(\0\0\0\x7f\0\0\0\aRColor\0\x1\xff\xff\0\0\0\0\0\0\0\0\0\x2)
MetaGridColor  =@Variant(\0\0\0\x7f\0\0\0\aRColor\0\x1\xff\xff\xff\xff\xfe\xfe\xfd\xfd\0\0\0\x2)

Setting the alpha channel value and the color mode for RColor doesn’t change anything.
Using view.setBackgroundColor() instead works for the background color, but not for other colors such as the meta grid color.

Closed by  Anonymous Submitter
14.04.2011 13:53
Reason for closing:  Not a bug
Admin
Andrew commented on 14.04.2011 10:20

The background color of a graphics view can be set without changing the configuration file (view.setBackgroundColor()). This override is needed for the part library icons (white background) and also serves as cache.

To set the background color for an existing graphics view (does not change the settings file):

view.setBackgroundColor(...);

To set the background color for all new graphics views (changes the settings file):

RSettings.setValue("GraphicsViewColors/BackgroundColor", ...);

To set the background color for an existing graphics view and changing the settings file, both lines are needed.

For all other colors, RSettings.setValue(...) can be used.

Anonymous Submitter commented on 14.04.2011 11:25

yes, but

RSettings.setValue("GraphicsViewColors/BackgroundColor", ...);

stores black (0) for any given value. That's the bug.

Sure I can make it with a workaround for the book images. The idea was to have a setup method, where all things are set right (colors, dock window settings etc.). At this point in time there is no drawing opened, so changing the config file was the only way.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing